

//add_header_element ( "script", {...} )  

TextNews = function( obj )	{
	
	this.obj = (typeof obj == "object" )? obj : (
		(obj == "first")? $$('.TextNews')[0] : $$('.TextNews').pop()
	);
	
	this.children = this.obj.select('li');
	this.children.each( function( el ) {
		el.observe( "click", function( e ){ this.toggleClassName( "active" ); } );
	} );

}

TextNews.prototype =	{
	expand		: function( cond ) {
		
		if( cond == "first" ) this.children[0].addClassName( "active" );
		else if( !cond ) this.children.invoke( "addClassName", "active");
		else for( n=0; n<cond; n++ ) chlidren[ n ].addClassName( "active" );
	}
}